<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-4"></span><span class="hs-comment">--</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- Tasks running external programs for SysTools</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- (c) The GHC Team 2017</span><span>
</span><span id="line-8"></span><span class="hs-comment">--</span><span>
</span><span id="line-9"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-10"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">GHC.SysTools.Tasks</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-11"></span><span>
</span><span id="line-12"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Exception.html"><span class="hs-identifier">GHC.Utils.Exception</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Exception</span></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Error.html"><span class="hs-identifier">GHC.Utils.Error</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html"><span class="hs-identifier">GHC.CmmToLlvm.Base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#LlvmVersion"><span class="hs-identifier">LlvmVersion</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#llvmVersionStr"><span class="hs-identifier">llvmVersionStr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#supportedLlvmVersionLowerBound"><span class="hs-identifier">supportedLlvmVersionLowerBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#supportedLlvmVersionUpperBound"><span class="hs-identifier">supportedLlvmVersionUpperBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#llvmVersionStr"><span class="hs-identifier">llvmVersionStr</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#parseLlvmVersion"><span class="hs-identifier">parseLlvmVersion</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Types.html"><span class="hs-identifier">GHC.Driver.Types</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html"><span class="hs-identifier">GHC.Driver.Session</span></a></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Outputable.html"><span class="hs-identifier">GHC.Utils.Outputable</span></a></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../ghc-boot/src/GHC.Platform.html#"><span class="hs-identifier">GHC.Platform</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Utils.Misc.html"><span class="hs-identifier">GHC.Utils.Misc</span></a></span><span>
</span><span id="line-20"></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.List.html#"><span class="hs-identifier">Data.List</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Char.html#"><span class="hs-identifier">Data.Char</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.Maybe.html#"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/System.IO.html#"><span class="hs-identifier">System.IO</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../process/src/System.Process.html#"><span class="hs-identifier">System.Process</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Prelude.html"><span class="hs-identifier">GHC.Prelude</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.SysTools.Process.html"><span class="hs-identifier">GHC.SysTools.Process</span></a></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.SysTools.Info.html"><span class="hs-identifier">GHC.SysTools.Info</span></a></span><span>
</span><span id="line-31"></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#join"><span class="hs-identifier">join</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Traversable.html#forM"><span class="hs-identifier">forM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#filterM"><span class="hs-identifier">filterM</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier">void</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../directory/src/System.Directory.html#"><span class="hs-identifier">System.Directory</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier">doesFileExist</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../filepath/src/System.FilePath.html#"><span class="hs-identifier">System.FilePath</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator">(&lt;/&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Parser</span></span><span>
</span><span id="line-36"></span><span>
</span><span id="line-37"></span><span class="hs-comment">{-
************************************************************************
*                                                                      *
\subsection{Running an external program}
*                                                                      *
************************************************************************
-}</span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runUnlit"><span class="hs-identifier hs-type">runUnlit</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span id="runUnlit"><span class="annot"><span class="annottext">runUnlit :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runUnlit"><span class="hs-identifier hs-var hs-var">runUnlit</span></a></span></span><span> </span><span id="local-6989586621681012300"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012300"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012299"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012299"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012300"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;unlit&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-47"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012297"><span class="annot"><span class="annottext">prog :: FilePath
</span><a href="#local-6989586621681012297"><span class="hs-identifier hs-var hs-var">prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_L"><span class="hs-identifier hs-var">pgm_L</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012300"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-48"></span><span>      </span><span id="local-6989586621681012295"><span class="annot"><span class="annottext">opts :: [FilePath]
</span><a href="#local-6989586621681012295"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012300"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_L"><span class="hs-identifier hs-var">opt_L</span></a></span><span>
</span><span id="line-49"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomething"><span class="hs-identifier hs-var">runSomething</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012300"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Literate pre-processor&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012297"><span class="hs-identifier hs-var">prog</span></a></span><span>
</span><span id="line-50"></span><span>               </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012295"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012299"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runCpp"><span class="hs-identifier hs-type">runCpp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-53"></span><span id="runCpp"><span class="annot"><span class="annottext">runCpp :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runCpp"><span class="hs-identifier hs-var hs-var">runCpp</span></a></span></span><span> </span><span id="local-6989586621681012289"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012288"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012288"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;cpp&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-54"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012287"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012287"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012286"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012286"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_P"><span class="hs-identifier hs-var">pgm_P</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-55"></span><span>      </span><span id="local-6989586621681012284"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012284"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_P"><span class="hs-identifier hs-var">opt_P</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-56"></span><span>      </span><span id="local-6989586621681012282"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012282"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-Werror&quot;</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnIsError"><span class="hs-identifier hs-var">Opt_WarnIsError</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-57"></span><span>                </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-Wundef&quot;</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">WarningFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#wopt"><span class="hs-identifier hs-var">wopt</span></a></span><span> </span><span class="annot"><span class="annottext">WarningFlag
</span><a href="GHC.Driver.Flags.html#Opt_WarnCPPUndef"><span class="hs-identifier hs-var">Opt_WarnCPPUndef</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-58"></span><span>  </span><span id="local-6989586621681012277"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012277"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012282"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-59"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012289"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>  </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;C pre-processor&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012287"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-60"></span><span>                       </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012286"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012284"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012282"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012288"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012277"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runPp"><span class="hs-identifier hs-type">runPp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-63"></span><span id="runPp"><span class="annot"><span class="annottext">runPp :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runPp"><span class="hs-identifier hs-var hs-var">runPp</span></a></span></span><span> </span><span id="local-6989586621681012272"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012272"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012271"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012271"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012272"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;pp&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012270"><span class="annot"><span class="annottext">prog :: FilePath
</span><a href="#local-6989586621681012270"><span class="hs-identifier hs-var hs-var">prog</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_F"><span class="hs-identifier hs-var">pgm_F</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012272"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-65"></span><span>      </span><span id="local-6989586621681012268"><span class="annot"><span class="annottext">opts :: [Option]
</span><a href="#local-6989586621681012268"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012272"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_F"><span class="hs-identifier hs-var">opt_F</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-66"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomething"><span class="hs-identifier hs-var">runSomething</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012272"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Haskell pre-processor&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012270"><span class="hs-identifier hs-var">prog</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012271"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012268"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span class="hs-comment">-- | Run compiler of C-like languages and raw objects (such as gcc or clang).</span><span>
</span><span id="line-69"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runCc"><span class="hs-identifier hs-type">runCc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#ForeignSrcLang"><span class="hs-identifier hs-type">ForeignSrcLang</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-70"></span><span id="runCc"><span class="annot"><span class="annottext">runCc :: Maybe ForeignSrcLang -&gt; DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runCc"><span class="hs-identifier hs-var hs-var">runCc</span></a></span></span><span> </span><span id="local-6989586621681012265"><span class="annot"><span class="annottext">Maybe ForeignSrcLang
</span><a href="#local-6989586621681012265"><span class="hs-identifier hs-var">mLanguage</span></a></span></span><span> </span><span id="local-6989586621681012264"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012263"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012263"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;cc&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-71"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012262"><span class="annot"><span class="annottext">p :: FilePath
</span><a href="#local-6989586621681012262"><span class="hs-identifier hs-var hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_c"><span class="hs-identifier hs-var">pgm_c</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-72"></span><span>      </span><span id="local-6989586621681012260"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012260"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012259"><span class="hs-identifier hs-var">userOpts</span></a></span><span>
</span><span id="line-73"></span><span>      </span><span id="local-6989586621681012258"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012258"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012257"><span class="hs-identifier hs-var">languageOptions</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012263"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012260"><span class="hs-identifier hs-var">args1</span></a></span><span>
</span><span id="line-74"></span><span>      </span><span class="hs-comment">-- We take care to pass -optc flags in args1 last to ensure that the</span><span>
</span><span id="line-75"></span><span>      </span><span class="hs-comment">-- user can override flags passed by GHC. See #14452.</span><span>
</span><span id="line-76"></span><span>  </span><span id="local-6989586621681012256"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012256"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012258"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-77"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingResponseFile"><span class="hs-identifier hs-var">runSomethingResponseFile</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="#local-6989586621681012254"><span class="hs-identifier hs-var">cc_filter</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;C Compiler&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012262"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012258"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012256"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-78"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-79"></span><span>  </span><span class="hs-comment">-- discard some harmless warnings from gcc that we can't turn off</span><span>
</span><span id="line-80"></span><span>  </span><span id="local-6989586621681012254"><span class="annot"><span class="annottext">cc_filter :: FilePath -&gt; FilePath
</span><a href="#local-6989586621681012254"><span class="hs-identifier hs-var hs-var">cc_filter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; FilePath)
-&gt; (FilePath -&gt; [FilePath]) -&gt; FilePath -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012251"><span class="hs-identifier hs-var">doFilter</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath])
-&gt; (FilePath -&gt; [FilePath]) -&gt; FilePath -&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span>
</span><span id="line-81"></span><span>
</span><span id="line-82"></span><span>  </span><span class="hs-comment">{-
  gcc gives warnings in chunks like so:
      In file included from /foo/bar/baz.h:11,
                       from /foo/bar/baz2.h:22,
                       from wibble.c:33:
      /foo/flibble:14: global register variable ...
      /foo/flibble:15: warning: call-clobbered r...
  We break it up into its chunks, remove any call-clobbered register
  warnings from each chunk, and then delete any chunks that we have
  emptied of warnings.
  -}</span><span>
</span><span id="line-93"></span><span>  </span><span id="local-6989586621681012251"><span class="annot"><span class="annottext">doFilter :: [FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012251"><span class="hs-identifier hs-var hs-var">doFilter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [FilePath]
</span><a href="#local-6989586621681012249"><span class="hs-identifier hs-var">unChunkWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">([([FilePath], [FilePath])] -&gt; [FilePath])
-&gt; ([FilePath] -&gt; [([FilePath], [FilePath])])
-&gt; [FilePath]
-&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">([([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])])
-&gt; ([FilePath] -&gt; [([FilePath], [FilePath])])
-&gt; [FilePath]
-&gt; [([FilePath], [FilePath])]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012247"><span class="hs-identifier hs-var">chunkWarnings</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-94"></span><span>  </span><span class="hs-comment">-- We can't assume that the output will start with an &quot;In file inc...&quot;</span><span>
</span><span id="line-95"></span><span>  </span><span class="hs-comment">-- line, so we start off expecting a list of warnings rather than a</span><span>
</span><span id="line-96"></span><span>  </span><span class="hs-comment">-- location stack.</span><span>
</span><span id="line-97"></span><span>  </span><span class="annot"><a href="#local-6989586621681012247"><span class="hs-identifier hs-type">chunkWarnings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- The location stack to use for the next</span><span>
</span><span id="line-98"></span><span>                            </span><span class="hs-comment">-- list of warnings</span><span>
</span><span id="line-99"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-comment">-- The remaining lines to look at</span><span>
</span><span id="line-100"></span><span>                </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-101"></span><span>  </span><span id="local-6989586621681012247"><span class="annot"><span class="annottext">chunkWarnings :: [FilePath] -&gt; [FilePath] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012247"><span class="hs-identifier hs-var hs-var">chunkWarnings</span></a></span></span><span> </span><span id="local-6989586621681012246"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012246"><span class="hs-identifier hs-var">loc_stack</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012246"><span class="hs-identifier hs-var">loc_stack</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-102"></span><span>  </span><span class="annot"><a href="#local-6989586621681012247"><span class="hs-identifier hs-var">chunkWarnings</span></a></span><span> </span><span id="local-6989586621681012245"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012245"><span class="hs-identifier hs-var">loc_stack</span></a></span></span><span> </span><span id="local-6989586621681012244"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012244"><span class="hs-identifier hs-var">xs</span></a></span></span><span>
</span><span id="line-103"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; ([FilePath], [FilePath])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Bool
</span><a href="#local-6989586621681012242"><span class="hs-identifier hs-var">loc_stack_start</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012244"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-104"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681012241"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012241"><span class="hs-identifier hs-var">warnings</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012240"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012240"><span class="hs-identifier hs-var">lss</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621681012239"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012239"><span class="hs-identifier hs-var">xs'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-105"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; ([FilePath], [FilePath])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Bool
</span><a href="#local-6989586621681012237"><span class="hs-identifier hs-var">loc_start_continuation</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012239"><span class="hs-identifier hs-var">xs'</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-106"></span><span>            </span><span class="hs-special">(</span><span id="local-6989586621681012236"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012236"><span class="hs-identifier hs-var">lsc</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012235"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012235"><span class="hs-identifier hs-var">xs''</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-107"></span><span>                </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012245"><span class="hs-identifier hs-var">loc_stack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012241"><span class="hs-identifier hs-var">warnings</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath])
-&gt; [([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012247"><span class="hs-identifier hs-var">chunkWarnings</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012240"><span class="hs-identifier hs-var">lss</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; [FilePath]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012236"><span class="hs-identifier hs-var">lsc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012235"><span class="hs-identifier hs-var">xs''</span></a></span><span>
</span><span id="line-108"></span><span>        </span><span class="annot"><span class="annottext">([FilePath], [FilePath])
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012245"><span class="hs-identifier hs-var">loc_stack</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012244"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-109"></span><span>
</span><span id="line-110"></span><span>  </span><span class="annot"><a href="#local-6989586621681012248"><span class="hs-identifier hs-type">filterWarnings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-111"></span><span>  </span><span id="local-6989586621681012248"><span class="annot"><span class="annottext">filterWarnings :: [([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012248"><span class="hs-identifier hs-var hs-var">filterWarnings</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-112"></span><span>  </span><span class="hs-comment">-- If the warnings are already empty then we are probably doing</span><span>
</span><span id="line-113"></span><span>  </span><span class="hs-comment">-- something wrong, so don't delete anything</span><span>
</span><span id="line-114"></span><span>  </span><span class="annot"><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681012234"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012234"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681012233"><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012233"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012234"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath])
-&gt; [([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012233"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-115"></span><span>  </span><span class="annot"><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681012232"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012232"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012231"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012231"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681012230"><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012230"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; [FilePath]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Bool
</span><a href="#local-6989586621681012229"><span class="hs-identifier hs-var">wantedWarning</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012231"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-116"></span><span>                                       </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012230"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-117"></span><span>                                       </span><span id="local-6989586621681012228"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012228"><span class="hs-identifier hs-var">ys'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012232"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012228"><span class="hs-identifier hs-var">ys'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath])
-&gt; [([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [([FilePath], [FilePath])]
</span><a href="#local-6989586621681012248"><span class="hs-identifier hs-var">filterWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012230"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-118"></span><span>
</span><span id="line-119"></span><span>  </span><span class="annot"><a href="#local-6989586621681012249"><span class="hs-identifier hs-type">unChunkWarnings</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-120"></span><span>  </span><span id="local-6989586621681012249"><span class="annot"><span class="annottext">unChunkWarnings :: [([FilePath], [FilePath])] -&gt; [FilePath]
</span><a href="#local-6989586621681012249"><span class="hs-identifier hs-var hs-var">unChunkWarnings</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-121"></span><span>  </span><span class="annot"><a href="#local-6989586621681012249"><span class="hs-identifier hs-var">unChunkWarnings</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">(</span><span id="local-6989586621681012227"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012227"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012226"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012226"><span class="hs-identifier hs-var">ys</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span> </span><span id="local-6989586621681012225"><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012225"><span class="hs-identifier hs-var">zs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012227"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012226"><span class="hs-identifier hs-var">ys</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])] -&gt; [FilePath]
</span><a href="#local-6989586621681012249"><span class="hs-identifier hs-var">unChunkWarnings</span></a></span><span> </span><span class="annot"><span class="annottext">[([FilePath], [FilePath])]
</span><a href="#local-6989586621681012225"><span class="hs-identifier hs-var">zs</span></a></span><span>
</span><span id="line-122"></span><span>
</span><span id="line-123"></span><span>  </span><span id="local-6989586621681012242"><span class="annot"><span class="annottext">loc_stack_start :: FilePath -&gt; Bool
</span><a href="#local-6989586621681012242"><span class="hs-identifier hs-var hs-var">loc_stack_start</span></a></span></span><span>        </span><span id="local-6989586621681012223"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012223"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;In file included from &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012223"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-124"></span><span>  </span><span id="local-6989586621681012237"><span class="annot"><span class="annottext">loc_start_continuation :: FilePath -&gt; Bool
</span><a href="#local-6989586621681012237"><span class="hs-identifier hs-var hs-var">loc_start_continuation</span></a></span></span><span> </span><span id="local-6989586621681012220"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012220"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;                 from &quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012220"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-125"></span><span>  </span><span id="local-6989586621681012229"><span class="annot"><span class="annottext">wantedWarning :: FilePath -&gt; Bool
</span><a href="#local-6989586621681012229"><span class="hs-identifier hs-var hs-var">wantedWarning</span></a></span></span><span> </span><span id="local-6989586621681012219"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012219"><span class="hs-identifier hs-var">w</span></a></span></span><span>
</span><span id="line-126"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;warning: call-clobbered register used&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Bool
</span><a href="GHC.SysTools.Tasks.html#isContainedIn"><span class="hs-operator hs-var">`isContainedIn`</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012219"><span class="hs-identifier hs-var">w</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-127"></span><span>   </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-128"></span><span>
</span><span id="line-129"></span><span>  </span><span class="hs-comment">-- force the C compiler to interpret this file as C when</span><span>
</span><span id="line-130"></span><span>  </span><span class="hs-comment">-- compiling .hc files, by adding the -x c option.</span><span>
</span><span id="line-131"></span><span>  </span><span class="hs-comment">-- Also useful for plain .c files, just in case GHC saw a</span><span>
</span><span id="line-132"></span><span>  </span><span class="hs-comment">-- -x c option.</span><span>
</span><span id="line-133"></span><span>  </span><span class="hs-special">(</span><span id="local-6989586621681012257"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012257"><span class="hs-identifier hs-var">languageOptions</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012259"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012259"><span class="hs-identifier hs-var">userOpts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe ForeignSrcLang
</span><a href="#local-6989586621681012265"><span class="hs-identifier hs-var">mLanguage</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-134"></span><span>    </span><span class="annot"><span class="annottext">Maybe ForeignSrcLang
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012217"><span class="hs-identifier hs-var">userOpts_c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-135"></span><span>    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621681012216"><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="#local-6989586621681012216"><span class="hs-identifier hs-var">language</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-x&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012215"><span class="hs-identifier hs-var">languageName</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012214"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-136"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-137"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621681012215"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012215"><span class="hs-identifier hs-var">languageName</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012214"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012214"><span class="hs-identifier hs-var">opts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="#local-6989586621681012216"><span class="hs-identifier hs-var">language</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-138"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#LangC"><span class="hs-identifier hs-var">LangC</span></a></span><span>      </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;c&quot;</span></span><span class="hs-special">,</span><span>             </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012217"><span class="hs-identifier hs-var">userOpts_c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-139"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#LangCxx"><span class="hs-identifier hs-var">LangCxx</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;c++&quot;</span></span><span class="hs-special">,</span><span>           </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012211"><span class="hs-identifier hs-var">userOpts_cxx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#LangObjc"><span class="hs-identifier hs-var">LangObjc</span></a></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;objective-c&quot;</span></span><span class="hs-special">,</span><span>   </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012217"><span class="hs-identifier hs-var">userOpts_c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#LangObjcxx"><span class="hs-identifier hs-var">LangObjcxx</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;objective-c++&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012211"><span class="hs-identifier hs-var">userOpts_cxx</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#LangAsm"><span class="hs-identifier hs-var">LangAsm</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;assembler&quot;</span></span><span class="hs-special">,</span><span>     </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>          </span><span class="annot"><span class="annottext">ForeignSrcLang
</span><a href="../../ghc-boot-th/src/GHC.ForeignSrcLang.Type.html#RawObject"><span class="hs-identifier hs-var">RawObject</span></a></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;c&quot;</span></span><span class="hs-special">,</span><span>             </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- claim C for lack of a better idea</span><span>
</span><span id="line-144"></span><span>  </span><span id="local-6989586621681012217"><span class="annot"><span class="annottext">userOpts_c :: [FilePath]
</span><a href="#local-6989586621681012217"><span class="hs-identifier hs-var hs-var">userOpts_c</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_c"><span class="hs-identifier hs-var">opt_c</span></a></span><span>
</span><span id="line-145"></span><span>  </span><span id="local-6989586621681012211"><span class="annot"><span class="annottext">userOpts_cxx :: [FilePath]
</span><a href="#local-6989586621681012211"><span class="hs-identifier hs-var hs-var">userOpts_cxx</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012264"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_cxx"><span class="hs-identifier hs-var">opt_cxx</span></a></span><span>
</span><span id="line-146"></span><span>
</span><span id="line-147"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#isContainedIn"><span class="hs-identifier hs-type">isContainedIn</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span>
</span><span id="line-148"></span><span id="local-6989586621681012204"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012204"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="isContainedIn"><span class="annot"><span class="annottext">isContainedIn :: FilePath -&gt; FilePath -&gt; Bool
</span><a href="GHC.SysTools.Tasks.html#isContainedIn"><span class="hs-operator hs-var hs-var">`isContainedIn`</span></a></span></span><span> </span><span id="local-6989586621681012203"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012203"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#any"><span class="hs-identifier hs-var">any</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012204"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-operator hs-var">`isPrefixOf`</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
forall a. [a] -&gt; [[a]]
</span><a href="../../base/src/Data.OldList.html#tails"><span class="hs-identifier hs-var">tails</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012203"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span class="hs-comment">-- | Run the linker with some arguments and return the output</span><span>
</span><span id="line-151"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#askLd"><span class="hs-identifier hs-type">askLd</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-152"></span><span id="askLd"><span class="annot"><span class="annottext">askLd :: DynFlags -&gt; [Option] -&gt; IO FilePath
</span><a href="GHC.SysTools.Tasks.html#askLd"><span class="hs-identifier hs-var hs-var">askLd</span></a></span></span><span> </span><span id="local-6989586621681012199"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012199"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012198"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012198"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO FilePath -&gt; IO FilePath
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012199"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;linker&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO FilePath -&gt; IO FilePath) -&gt; IO FilePath -&gt; IO FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-153"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012197"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012197"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012196"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012196"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_l"><span class="hs-identifier hs-var">pgm_l</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012199"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-154"></span><span>      </span><span id="local-6989586621681012194"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012194"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012199"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_l"><span class="hs-identifier hs-var">opt_l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-155"></span><span>      </span><span id="local-6989586621681012192"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012192"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012196"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012194"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012198"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-156"></span><span>  </span><span id="local-6989586621681012191"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012191"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012192"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-157"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; ([FilePath] -&gt; IO (ExitCode, FilePath))
-&gt; IO FilePath
forall a.
DynFlags
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; ([FilePath] -&gt; IO (ExitCode, a))
-&gt; IO a
</span><a href="GHC.SysTools.Process.html#runSomethingWith"><span class="hs-identifier hs-var">runSomethingWith</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012199"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;gcc&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012197"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012192"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath] -&gt; IO (ExitCode, FilePath)) -&gt; IO FilePath)
-&gt; ([FilePath] -&gt; IO (ExitCode, FilePath)) -&gt; IO FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681012189"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012189"><span class="hs-identifier hs-var">real_args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-158"></span><span>    </span><span class="annot"><span class="annottext">CreateProcess -&gt; IO (ExitCode, FilePath)
</span><a href="GHC.SysTools.Process.html#readCreateProcessWithExitCode%27"><span class="hs-identifier hs-var">readCreateProcessWithExitCode'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; CreateProcess
</span><a href="../../process/src/System.Process.html#proc"><span class="hs-identifier hs-var">proc</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012197"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012189"><span class="hs-identifier hs-var">real_args</span></a></span><span class="hs-special">)</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">env :: Maybe [(FilePath, FilePath)]
</span><a href="../../process/src/System.Process.Common.html#env"><span class="hs-identifier hs-var">env</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012191"><span class="hs-identifier hs-var">mb_env</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runAs"><span class="hs-identifier hs-type">runAs</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-161"></span><span id="runAs"><span class="annot"><span class="annottext">runAs :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runAs"><span class="hs-identifier hs-var hs-var">runAs</span></a></span></span><span> </span><span id="local-6989586621681012184"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012184"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012183"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012183"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012184"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;as&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-162"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012182"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012182"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012181"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012181"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_a"><span class="hs-identifier hs-var">pgm_a</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012184"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-163"></span><span>      </span><span id="local-6989586621681012179"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012179"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012184"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_a"><span class="hs-identifier hs-var">opt_a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-164"></span><span>      </span><span id="local-6989586621681012177"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012177"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012181"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012179"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012183"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-165"></span><span>  </span><span id="local-6989586621681012176"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012176"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012177"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-166"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012184"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Assembler&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012182"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012177"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012176"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-167"></span><span>
</span><span id="line-168"></span><span class="hs-comment">-- | Run the LLVM Optimiser</span><span>
</span><span id="line-169"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runLlvmOpt"><span class="hs-identifier hs-type">runLlvmOpt</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-170"></span><span id="runLlvmOpt"><span class="annot"><span class="annottext">runLlvmOpt :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runLlvmOpt"><span class="hs-identifier hs-var hs-var">runLlvmOpt</span></a></span></span><span> </span><span id="local-6989586621681012174"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012174"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012173"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012173"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012174"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;opt&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-171"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012172"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012172"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012171"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012171"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_lo"><span class="hs-identifier hs-var">pgm_lo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012174"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-172"></span><span>      </span><span id="local-6989586621681012169"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012169"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012174"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_lo"><span class="hs-identifier hs-var">opt_lo</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-173"></span><span>      </span><span class="hs-comment">-- We take care to pass -optlo flags (e.g. args0) last to ensure that the</span><span>
</span><span id="line-174"></span><span>      </span><span class="hs-comment">-- user can override flags passed by GHC. See #14821.</span><span>
</span><span id="line-175"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomething"><span class="hs-identifier hs-var">runSomething</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012174"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;LLVM Optimiser&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012172"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012169"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012173"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012171"><span class="hs-identifier hs-var">args0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-176"></span><span>
</span><span id="line-177"></span><span class="hs-comment">-- | Run the LLVM Compiler</span><span>
</span><span id="line-178"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runLlvmLlc"><span class="hs-identifier hs-type">runLlvmLlc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-179"></span><span id="runLlvmLlc"><span class="annot"><span class="annottext">runLlvmLlc :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runLlvmLlc"><span class="hs-identifier hs-var hs-var">runLlvmLlc</span></a></span></span><span> </span><span id="local-6989586621681012166"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012166"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012165"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012165"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012166"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;llc&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-180"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012164"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012164"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012163"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012163"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_lc"><span class="hs-identifier hs-var">pgm_lc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012166"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-181"></span><span>      </span><span id="local-6989586621681012161"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012161"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012166"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_lc"><span class="hs-identifier hs-var">opt_lc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-182"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomething"><span class="hs-identifier hs-var">runSomething</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012166"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;LLVM Compiler&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012164"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012163"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012161"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012165"><span class="hs-identifier hs-var">args</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="hs-comment">-- | Run the clang compiler (used as an assembler for the LLVM</span><span>
</span><span id="line-185"></span><span class="hs-comment">-- backend on OS X as LLVM doesn't support the OS X system</span><span>
</span><span id="line-186"></span><span class="hs-comment">-- assembler)</span><span>
</span><span id="line-187"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runClang"><span class="hs-identifier hs-type">runClang</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-188"></span><span id="runClang"><span class="annot"><span class="annottext">runClang :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runClang"><span class="hs-identifier hs-var hs-var">runClang</span></a></span></span><span> </span><span id="local-6989586621681012158"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012157"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012157"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;clang&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-189"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012156"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012156"><span class="hs-identifier hs-var">clang</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">[Option]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_lcc"><span class="hs-identifier hs-var">pgm_lcc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-190"></span><span>      </span><span class="hs-comment">-- be careful what options we call clang with</span><span>
</span><span id="line-191"></span><span>      </span><span class="hs-comment">-- see #5903 and #7617 for bugs caused by this.</span><span>
</span><span id="line-192"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span id="local-6989586621681012154"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012154"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_a"><span class="hs-identifier hs-var">pgm_a</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-193"></span><span>      </span><span id="local-6989586621681012153"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012153"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_a"><span class="hs-identifier hs-var">opt_a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-194"></span><span>      </span><span id="local-6989586621681012152"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012152"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012154"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012153"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012157"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-195"></span><span>  </span><span id="local-6989586621681012151"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012151"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012152"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-196"></span><span>  </span><span class="annot"><span class="annottext">IO () -&gt; (SomeException -&gt; IO ()) -&gt; IO ()
forall e a. Exception e =&gt; IO a -&gt; (e -&gt; IO a) -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#catch"><span class="hs-identifier hs-var">catch</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span>
</span><span id="line-197"></span><span>        </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Clang (Assembler)&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012156"><span class="hs-identifier hs-var">clang</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012152"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012151"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-198"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-199"></span><span>    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span class="hs-special">(</span><span id="local-6989586621681012149"><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621681012149"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Exception.Type.html#SomeException"><span class="hs-identifier hs-type">SomeException</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-200"></span><span>        </span><span class="annot"><span class="annottext">DynFlags -&gt; MsgDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#errorMsg"><span class="hs-identifier hs-var">errorMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012158"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IO ()) -&gt; MsgDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-201"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Error running clang! you need clang installed to use the&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-202"></span><span>                  </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; LLVM backend&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span>
</span><span id="line-203"></span><span>            </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;(or GHC tried to execute clang incorrectly)&quot;</span></span><span>
</span><span id="line-204"></span><span>        </span><span class="annot"><span class="annottext">SomeException -&gt; IO ()
forall e a. Exception e =&gt; e -&gt; IO a
</span><a href="../../base/src/GHC.IO.html#throwIO"><span class="hs-identifier hs-var">throwIO</span></a></span><span> </span><span class="annot"><span class="annottext">SomeException
</span><a href="#local-6989586621681012149"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-205"></span><span>    </span><span class="hs-special">)</span><span>
</span><span id="line-206"></span><span>
</span><span id="line-207"></span><span class="hs-comment">-- | Figure out which version of LLVM we are running this session</span><span>
</span><span id="line-208"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#figureLlvmVersion"><span class="hs-identifier hs-type">figureLlvmVersion</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.CmmToLlvm.Base.html#LlvmVersion"><span class="hs-identifier hs-type">LlvmVersion</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-209"></span><span id="figureLlvmVersion"><span class="annot"><span class="annottext">figureLlvmVersion :: DynFlags -&gt; IO (Maybe LlvmVersion)
</span><a href="GHC.SysTools.Tasks.html#figureLlvmVersion"><span class="hs-identifier hs-var hs-var">figureLlvmVersion</span></a></span></span><span> </span><span id="local-6989586621681012143"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012143"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags
-&gt; FilePath -&gt; IO (Maybe LlvmVersion) -&gt; IO (Maybe LlvmVersion)
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012143"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;llc&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO (Maybe LlvmVersion) -&gt; IO (Maybe LlvmVersion))
-&gt; IO (Maybe LlvmVersion) -&gt; IO (Maybe LlvmVersion)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-210"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012142"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012142"><span class="hs-identifier hs-var">pgm</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012141"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012141"><span class="hs-identifier hs-var">opts</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_lc"><span class="hs-identifier hs-var">pgm_lc</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012143"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-211"></span><span>      </span><span id="local-6989586621681012140"><span class="annot"><span class="annottext">args :: [FilePath]
</span><a href="#local-6989586621681012140"><span class="hs-identifier hs-var hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; [FilePath]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.Utils.Misc.html#notNull"><span class="hs-identifier hs-var">notNull</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Option -&gt; FilePath) -&gt; [Option] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Option -&gt; FilePath
</span><a href="GHC.Utils.CliOption.html#showOpt"><span class="hs-identifier hs-var">showOpt</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012141"><span class="hs-identifier hs-var">opts</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-212"></span><span>      </span><span class="hs-comment">-- we grab the args even though they should be useless just in</span><span>
</span><span id="line-213"></span><span>      </span><span class="hs-comment">-- case the user is using a customised 'llc' that requires some</span><span>
</span><span id="line-214"></span><span>      </span><span class="hs-comment">-- of the options they've specified. llc doesn't care what other</span><span>
</span><span id="line-215"></span><span>      </span><span class="hs-comment">-- options are specified when '-version' is used.</span><span>
</span><span id="line-216"></span><span>      </span><span id="local-6989586621681012137"><span class="annot"><span class="annottext">args' :: [FilePath]
</span><a href="#local-6989586621681012137"><span class="hs-identifier hs-var hs-var">args'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012140"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-version&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-217"></span><span>  </span><span class="annot"><span class="annottext">IO (Maybe LlvmVersion)
-&gt; (IOException -&gt; IO (Maybe LlvmVersion))
-&gt; IO (Maybe LlvmVersion)
forall a. IO a -&gt; (IOException -&gt; IO a) -&gt; IO a
</span><a href="GHC.Utils.Exception.html#catchIO"><span class="hs-identifier hs-var">catchIO</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">do</span><span>
</span><span id="line-218"></span><span>              </span><span class="hs-special">(</span><span id="local-6989586621681012135"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012135"><span class="hs-identifier hs-var">pin</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012134"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012134"><span class="hs-identifier hs-var">pout</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012133"><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012133"><span class="hs-identifier hs-var">perr</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621681012132"><span class="annot"><span class="annottext">ProcessHandle
</span><a href="#local-6989586621681012132"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath
-&gt; [FilePath]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO (Handle, Handle, Handle, ProcessHandle)
</span><a href="../../process/src/System.Process.html#runInteractiveProcess"><span class="hs-identifier hs-var">runInteractiveProcess</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012142"><span class="hs-identifier hs-var">pgm</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012137"><span class="hs-identifier hs-var">args'</span></a></span><span>
</span><span id="line-219"></span><span>                                              </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-220"></span><span>              </span><span class="hs-comment">{- &gt; llc -version
                  LLVM (http://llvm.org/):
                    LLVM version 3.5.2
                    ...
              -}</span><span>
</span><span id="line-225"></span><span>              </span><span class="annot"><span class="annottext">Handle -&gt; Bool -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hSetBinaryMode"><span class="hs-identifier hs-var">hSetBinaryMode</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012134"><span class="hs-identifier hs-var">pout</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-226"></span><span>              </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span>     </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO FilePath
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hGetLine"><span class="hs-identifier hs-var">hGetLine</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012134"><span class="hs-identifier hs-var">pout</span></a></span><span>
</span><span id="line-227"></span><span>              </span><span id="local-6989586621681012128"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012128"><span class="hs-identifier hs-var">vline</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Handle -&gt; IO FilePath
</span><a href="../../base/src/GHC.IO.Handle.Text.html#hGetLine"><span class="hs-identifier hs-var">hGetLine</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012134"><span class="hs-identifier hs-var">pout</span></a></span><span>
</span><span id="line-228"></span><span>              </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012127"><span class="annot"><span class="annottext">mb_ver :: Maybe LlvmVersion
</span><a href="#local-6989586621681012127"><span class="hs-identifier hs-var hs-var">mb_ver</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Maybe LlvmVersion
</span><a href="GHC.CmmToLlvm.Base.html#parseLlvmVersion"><span class="hs-identifier hs-var">parseLlvmVersion</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012128"><span class="hs-identifier hs-var">vline</span></a></span><span>
</span><span id="line-229"></span><span>              </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012135"><span class="hs-identifier hs-var">pin</span></a></span><span>
</span><span id="line-230"></span><span>              </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012134"><span class="hs-identifier hs-var">pout</span></a></span><span>
</span><span id="line-231"></span><span>              </span><span class="annot"><span class="annottext">Handle -&gt; IO ()
</span><a href="../../base/src/GHC.IO.Handle.html#hClose"><span class="hs-identifier hs-var">hClose</span></a></span><span> </span><span class="annot"><span class="annottext">Handle
</span><a href="#local-6989586621681012133"><span class="hs-identifier hs-var">perr</span></a></span><span>
</span><span id="line-232"></span><span>              </span><span class="annot"><span class="annottext">ExitCode
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ProcessHandle -&gt; IO ExitCode
</span><a href="../../process/src/System.Process.html#waitForProcess"><span class="hs-identifier hs-var">waitForProcess</span></a></span><span> </span><span class="annot"><span class="annottext">ProcessHandle
</span><a href="#local-6989586621681012132"><span class="hs-identifier hs-var">p</span></a></span><span>
</span><span id="line-233"></span><span>              </span><span class="annot"><span class="annottext">Maybe LlvmVersion -&gt; IO (Maybe LlvmVersion)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LlvmVersion
</span><a href="#local-6989586621681012127"><span class="hs-identifier hs-var">mb_ver</span></a></span><span>
</span><span id="line-234"></span><span>            </span><span class="hs-special">)</span><span>
</span><span id="line-235"></span><span>            </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681012124"><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621681012124"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-236"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; Int -&gt; MsgDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#debugTraceMsg"><span class="hs-identifier hs-var">debugTraceMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012143"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-237"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Error (figuring out LLVM version):&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-238"></span><span>                      </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">IOException -&gt; FilePath
forall a. Show a =&gt; a -&gt; FilePath
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">IOException
</span><a href="#local-6989586621681012124"><span class="hs-identifier hs-var">err</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-239"></span><span>                </span><span class="annot"><span class="annottext">DynFlags -&gt; MsgDoc -&gt; IO ()
</span><a href="GHC.Utils.Error.html#errorMsg"><span class="hs-identifier hs-var">errorMsg</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012143"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; IO ()) -&gt; MsgDoc -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[MsgDoc] -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span>
</span><span id="line-240"></span><span>                    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Warning:&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Int -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#nest"><span class="hs-identifier hs-var">nest</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">9</span></span><span> </span><span class="annot"><span class="annottext">(MsgDoc -&gt; MsgDoc) -&gt; MsgDoc -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-241"></span><span>                          </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Couldn't figure out LLVM version!&quot;</span></span><span> </span><span class="annot"><span class="annottext">MsgDoc -&gt; MsgDoc -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#%24%24"><span class="hs-operator hs-var">$$</span></a></span><span>
</span><span id="line-242"></span><span>                          </span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Make sure you have installed LLVM between [&quot;</span></span><span>
</span><span id="line-243"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">LlvmVersion -&gt; FilePath
</span><a href="GHC.CmmToLlvm.Base.html#llvmVersionStr"><span class="hs-identifier hs-var">llvmVersionStr</span></a></span><span> </span><span class="annot"><span class="annottext">LlvmVersion
</span><a href="GHC.CmmToLlvm.Base.html#supportedLlvmVersionLowerBound"><span class="hs-identifier hs-var">supportedLlvmVersionLowerBound</span></a></span><span>
</span><span id="line-244"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot; and &quot;</span></span><span>
</span><span id="line-245"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">LlvmVersion -&gt; FilePath
</span><a href="GHC.CmmToLlvm.Base.html#llvmVersionStr"><span class="hs-identifier hs-var">llvmVersionStr</span></a></span><span> </span><span class="annot"><span class="annottext">LlvmVersion
</span><a href="GHC.CmmToLlvm.Base.html#supportedLlvmVersionUpperBound"><span class="hs-identifier hs-var">supportedLlvmVersionUpperBound</span></a></span><span>
</span><span id="line-246"></span><span>                                </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;)&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-247"></span><span>                </span><span class="annot"><span class="annottext">Maybe LlvmVersion -&gt; IO (Maybe LlvmVersion)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe LlvmVersion
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-248"></span><span>
</span><span id="line-249"></span><span>
</span><span id="line-250"></span><span class="hs-comment">-- | On macOS we rely on the linkers @-dead_strip_dylibs@ flag to remove unused</span><span>
</span><span id="line-251"></span><span class="hs-comment">-- libraries from the dynamic library.  We do this to reduce the number of load</span><span>
</span><span id="line-252"></span><span class="hs-comment">-- commands that end up in the dylib, and has been limited to 32K (32768) since</span><span>
</span><span id="line-253"></span><span class="hs-comment">-- macOS Sierra (10.14).</span><span>
</span><span id="line-254"></span><span class="hs-comment">--</span><span>
</span><span id="line-255"></span><span class="hs-comment">-- @-dead_strip_dylibs@ does not dead strip @-rpath@ entries, as such passing</span><span>
</span><span id="line-256"></span><span class="hs-comment">-- @-l@ and @-rpath@ to the linker will result in the unnecesasry libraries not</span><span>
</span><span id="line-257"></span><span class="hs-comment">-- being included in the load commands, however the @-rpath@ entries are all</span><span>
</span><span id="line-258"></span><span class="hs-comment">-- forced to be included.  This can lead to 100s of @-rpath@ entries being</span><span>
</span><span id="line-259"></span><span class="hs-comment">-- included when only a handful of libraries end up being truely linked.</span><span>
</span><span id="line-260"></span><span class="hs-comment">--</span><span>
</span><span id="line-261"></span><span class="hs-comment">-- Thus after building the library, we run a fixup phase where we inject the</span><span>
</span><span id="line-262"></span><span class="hs-comment">-- @-rpath@ for each found library (in the given library search paths) into the</span><span>
</span><span id="line-263"></span><span class="hs-comment">-- dynamic library through @-add_rpath@.</span><span>
</span><span id="line-264"></span><span class="hs-comment">--</span><span>
</span><span id="line-265"></span><span class="hs-comment">-- See Note [Dynamic linking on macOS]</span><span>
</span><span id="line-266"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runInjectRPaths"><span class="hs-identifier hs-type">runInjectRPaths</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-267"></span><span id="runInjectRPaths"><span class="annot"><span class="annottext">runInjectRPaths :: DynFlags -&gt; [FilePath] -&gt; FilePath -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runInjectRPaths"><span class="hs-identifier hs-var hs-var">runInjectRPaths</span></a></span></span><span> </span><span id="local-6989586621681012116"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012116"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">GeneralFlag -&gt; DynFlags -&gt; Bool
</span><a href="GHC.Driver.Session.html#gopt"><span class="hs-identifier hs-var">gopt</span></a></span><span> </span><span class="annot"><span class="annottext">GeneralFlag
</span><a href="GHC.Driver.Flags.html#Opt_RPath"><span class="hs-identifier hs-var">Opt_RPath</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012116"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-268"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runInjectRPaths"><span class="hs-identifier hs-var">runInjectRPaths</span></a></span><span> </span><span id="local-6989586621681012113"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012113"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012112"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012112"><span class="hs-identifier hs-var">lib_paths</span></a></span></span><span> </span><span id="local-6989586621681012111"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012111"><span class="hs-identifier hs-var">dylib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-269"></span><span>  </span><span id="local-6989586621681012110"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012110"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; [FilePath]) -&gt; IO FilePath -&gt; IO [FilePath]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Maybe FilePath -&gt; [Option] -&gt; IO FilePath
</span><a href="GHC.SysTools.Tasks.html#askOtool"><span class="hs-identifier hs-var">askOtool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012113"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-L&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012111"><span class="hs-identifier hs-var">dylib</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-270"></span><span>  </span><span class="hs-comment">-- filter the output for only the libraries. And then drop the @rpath prefix.</span><span>
</span><span id="line-271"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012103"><span class="annot"><span class="annottext">libs :: [FilePath]
</span><a href="#local-6989586621681012103"><span class="hs-identifier hs-var hs-var">libs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; FilePath) -&gt; [FilePath] -&gt; [FilePath]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; FilePath -&gt; FilePath
forall a. Int -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#drop"><span class="hs-identifier hs-var">drop</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">7</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Bool) -&gt; [FilePath] -&gt; [FilePath]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;@rpath&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; FilePath) -&gt; [FilePath] -&gt; [FilePath]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
forall a. [a] -&gt; a
</span><a href="../../base/src/GHC.List.html#head"><span class="hs-identifier hs-var">head</span></a></span><span class="annot"><span class="annottext">([FilePath] -&gt; FilePath)
-&gt; (FilePath -&gt; [FilePath]) -&gt; FilePath -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../base/src/Data.OldList.html#words"><span class="hs-identifier hs-var">words</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012110"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-272"></span><span>  </span><span class="hs-comment">-- find any pre-existing LC_PATH items</span><span>
</span><span id="line-273"></span><span>  </span><span id="local-6989586621681012099"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012099"><span class="hs-identifier hs-var">info</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; [FilePath]) -&gt; IO FilePath -&gt; IO [FilePath]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; Maybe FilePath -&gt; [Option] -&gt; IO FilePath
</span><a href="GHC.SysTools.Tasks.html#askOtool"><span class="hs-identifier hs-var">askOtool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012113"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-l&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012111"><span class="hs-identifier hs-var">dylib</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-274"></span><span>
</span><span id="line-275"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012098"><span class="annot"><span class="annottext">paths :: [FilePath]
</span><a href="#local-6989586621681012098"><span class="hs-identifier hs-var hs-var">paths</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Maybe FilePath) -&gt; [FilePath] -&gt; [FilePath]
forall a b. (a -&gt; Maybe b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/Data.Maybe.html#mapMaybe"><span class="hs-identifier hs-var">mapMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Maybe FilePath
</span><a href="GHC.SysTools.Tasks.html#get_rpath"><span class="hs-identifier hs-var">get_rpath</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012099"><span class="hs-identifier hs-var">info</span></a></span><span>
</span><span id="line-276"></span><span>      </span><span id="local-6989586621681012092"><span class="annot"><span class="annottext">lib_paths' :: [FilePath]
</span><a href="#local-6989586621681012092"><span class="hs-identifier hs-var hs-var">lib_paths'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012091"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621681012091"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012091"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012112"><span class="hs-identifier hs-var">lib_paths</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012091"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. (Foldable t, Eq a) =&gt; a -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012098"><span class="hs-identifier hs-var">paths</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-277"></span><span>  </span><span class="hs-comment">-- only find those rpaths, that aren't already in the library.</span><span>
</span><span id="line-278"></span><span>  </span><span id="local-6989586621681012089"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012089"><span class="hs-identifier hs-var">rpaths</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
forall a. Eq a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#nub"><span class="hs-identifier hs-var">nub</span></a></span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath])
-&gt; ([[FilePath]] -&gt; [FilePath]) -&gt; [[FilePath]] -&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
forall a. Ord a =&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#sort"><span class="hs-identifier hs-var">sort</span></a></span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath])
-&gt; ([[FilePath]] -&gt; [FilePath]) -&gt; [[FilePath]] -&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="annot"><span class="annottext">[[FilePath]] -&gt; [FilePath]
forall (m :: * -&gt; *) a. Monad m =&gt; m (m a) -&gt; m a
</span><a href="../../base/src/GHC.Base.html#join"><span class="hs-identifier hs-var">join</span></a></span><span> </span><span class="annot"><span class="annottext">([[FilePath]] -&gt; [FilePath]) -&gt; IO [[FilePath]] -&gt; IO [FilePath]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/Data.Functor.html#%3C%24%3E"><span class="hs-operator hs-var">&lt;$&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; (FilePath -&gt; IO [FilePath]) -&gt; IO [[FilePath]]
forall (t :: * -&gt; *) (m :: * -&gt; *) a b.
(Traversable t, Monad m) =&gt;
t a -&gt; (a -&gt; m b) -&gt; m (t b)
</span><a href="../../base/src/Data.Traversable.html#forM"><span class="hs-identifier hs-var">forM</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012103"><span class="hs-identifier hs-var">libs</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681012086"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012086"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; IO Bool) -&gt; [FilePath] -&gt; IO [FilePath]
forall (m :: * -&gt; *) a.
Applicative m =&gt;
(a -&gt; m Bool) -&gt; [a] -&gt; m [a]
</span><a href="../../base/src/Control.Monad.html#filterM"><span class="hs-identifier hs-var">filterM</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621681012085"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012085"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; IO Bool
</span><a href="../../directory/src/System.Directory.html#doesFileExist"><span class="hs-identifier hs-var">doesFileExist</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012085"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
</span><a href="../../filepath/src/System.FilePath.Windows.html#%3C%2F%3E"><span class="hs-operator hs-var">&lt;/&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012086"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012092"><span class="hs-identifier hs-var">lib_paths'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-279"></span><span>  </span><span class="hs-comment">-- inject the rpaths</span><span>
</span><span id="line-280"></span><span>  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012089"><span class="hs-identifier hs-var">rpaths</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-281"></span><span>    </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; IO ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-282"></span><span>    </span><span class="annot"><span class="annottext">[FilePath]
</span><span class="hs-identifier">_</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runInstallNameTool"><span class="hs-identifier hs-var">runInstallNameTool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012113"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">([Option] -&gt; IO ()) -&gt; [Option] -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [Option]) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-add_rpath&quot;</span></span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; [FilePath]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; [FilePath]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intersperse"><span class="hs-identifier hs-var">intersperse</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-add_rpath&quot;</span></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012089"><span class="hs-identifier hs-var">rpaths</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012111"><span class="hs-identifier hs-var">dylib</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#get_rpath"><span class="hs-identifier hs-type">get_rpath</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-285"></span><span id="get_rpath"><span class="annot"><span class="annottext">get_rpath :: FilePath -&gt; Maybe FilePath
</span><a href="GHC.SysTools.Tasks.html#get_rpath"><span class="hs-identifier hs-var hs-var">get_rpath</span></a></span></span><span> </span><span id="local-6989586621681012082"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012082"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadS FilePath
forall a. ReadP a -&gt; ReadS a
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#readP_to_S"><span class="hs-identifier hs-var">readP_to_S</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP FilePath
</span><a href="GHC.SysTools.Tasks.html#rpath_parser"><span class="hs-identifier hs-var">rpath_parser</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012082"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-286"></span><span>                </span><span class="hs-special">[</span><span class="hs-special">(</span><span id="local-6989586621681012079"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012079"><span class="hs-identifier hs-var">rpath</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Maybe FilePath
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012079"><span class="hs-identifier hs-var">rpath</span></a></span><span>
</span><span id="line-287"></span><span>                </span><span class="annot"><span class="annottext">[(FilePath, FilePath)]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-288"></span><span>
</span><span id="line-289"></span><span>
</span><span id="line-290"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#rpath_parser"><span class="hs-identifier hs-type">rpath_parser</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span>
</span><span id="line-291"></span><span id="rpath_parser"><span class="annot"><span class="annottext">rpath_parser :: ReadP FilePath
</span><a href="GHC.SysTools.Tasks.html#rpath_parser"><span class="hs-identifier hs-var hs-var">rpath_parser</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-292"></span><span>  </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span>
</span><span id="line-293"></span><span>  </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP FilePath -&gt; ReadP ()) -&gt; ReadP FilePath -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ReadP FilePath
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;path&quot;</span></span><span>
</span><span id="line-294"></span><span>  </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP FilePath -&gt; ReadP ()) -&gt; ReadP FilePath -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP FilePath
forall a. ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-295"></span><span>  </span><span id="local-6989586621681012073"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012073"><span class="hs-identifier hs-var">rpath</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP FilePath
forall a. ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#many"><span class="hs-identifier hs-var">many</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-296"></span><span>  </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP FilePath -&gt; ReadP ()) -&gt; ReadP FilePath -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP FilePath
forall a. ReadP a -&gt; ReadP [a]
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#many1"><span class="hs-identifier hs-var">many1</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span>  </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP FilePath -&gt; ReadP ()) -&gt; ReadP FilePath -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; ReadP FilePath
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;(offset &quot;</span></span><span>
</span><span id="line-298"></span><span>  </span><span class="annot"><span class="annottext">ReadP FilePath -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP FilePath -&gt; ReadP ()) -&gt; ReadP FilePath -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP FilePath
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#munch1"><span class="hs-identifier hs-var">munch1</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isDigit"><span class="hs-identifier hs-var">isDigit</span></a></span><span>
</span><span id="line-299"></span><span>  </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP ()
forall (f :: * -&gt; *) a. Functor f =&gt; f a -&gt; f ()
</span><a href="../../base/src/Data.Functor.html#void"><span class="hs-identifier hs-var">void</span></a></span><span> </span><span class="annot"><span class="annottext">(ReadP Char -&gt; ReadP ()) -&gt; ReadP Char -&gt; ReadP ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">Parser.char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">')'</span></span><span>
</span><span id="line-300"></span><span>  </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="../../base/src/Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span>
</span><span id="line-301"></span><span>  </span><span class="annot"><span class="annottext">FilePath -&gt; ReadP FilePath
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012073"><span class="hs-identifier hs-var">rpath</span></a></span><span>
</span><span id="line-302"></span><span>
</span><span id="line-303"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runLink"><span class="hs-identifier hs-type">runLink</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span id="runLink"><span class="annot"><span class="annottext">runLink :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runLink"><span class="hs-identifier hs-var hs-var">runLink</span></a></span></span><span> </span><span id="local-6989586621681012066"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012065"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012065"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;linker&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-305"></span><span>  </span><span class="hs-comment">-- See Note [Run-time linker info]</span><span>
</span><span id="line-306"></span><span>  </span><span class="hs-comment">--</span><span>
</span><span id="line-307"></span><span>  </span><span class="hs-comment">-- `-optl` args come at the end, so that later `-l` options</span><span>
</span><span id="line-308"></span><span>  </span><span class="hs-comment">-- given there manually can fill in symbols needed by</span><span>
</span><span id="line-309"></span><span>  </span><span class="hs-comment">-- Haskell libraries coming in via `args`.</span><span>
</span><span id="line-310"></span><span>  </span><span id="local-6989586621681012064"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012064"><span class="hs-identifier hs-var">linkargs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LinkerInfo -&gt; [Option]
</span><a href="GHC.SysTools.Info.html#neededLinkArgs"><span class="hs-identifier hs-var">neededLinkArgs</span></a></span><span> </span><span class="annot"><span class="annottext">(LinkerInfo -&gt; [Option]) -&gt; IO LinkerInfo -&gt; IO [Option]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; IO LinkerInfo
</span><a href="GHC.SysTools.Info.html#getLinkerInfo"><span class="hs-identifier hs-var">getLinkerInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-311"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012061"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012061"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012060"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012060"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_l"><span class="hs-identifier hs-var">pgm_l</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-312"></span><span>      </span><span id="local-6989586621681012059"><span class="annot"><span class="annottext">optl_args :: [Option]
</span><a href="#local-6989586621681012059"><span class="hs-identifier hs-var hs-var">optl_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_l"><span class="hs-identifier hs-var">opt_l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-313"></span><span>      </span><span id="local-6989586621681012058"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012058"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012060"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012064"><span class="hs-identifier hs-var">linkargs</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012065"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012059"><span class="hs-identifier hs-var">optl_args</span></a></span><span>
</span><span id="line-314"></span><span>  </span><span id="local-6989586621681012057"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012057"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012058"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-315"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingResponseFile"><span class="hs-identifier hs-var">runSomethingResponseFile</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="#local-6989586621681012056"><span class="hs-identifier hs-var">ld_filter</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Linker&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012061"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012058"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012057"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-316"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-317"></span><span>    </span><span id="local-6989586621681012056"><span class="annot"><span class="annottext">ld_filter :: FilePath -&gt; FilePath
</span><a href="#local-6989586621681012056"><span class="hs-identifier hs-var hs-var">ld_filter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Platform -&gt; OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#platformOS"><span class="hs-identifier hs-var">platformOS</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Platform
</span><a href="GHC.Driver.Session.html#targetPlatform"><span class="hs-identifier hs-var hs-var">targetPlatform</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012066"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-318"></span><span>                  </span><span class="annot"><span class="annottext">OS
</span><a href="../../ghc-boot/src/GHC.Platform.html#OSSolaris2"><span class="hs-identifier hs-var">OSSolaris2</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="#local-6989586621681012052"><span class="hs-identifier hs-var">sunos_ld_filter</span></a></span><span>
</span><span id="line-319"></span><span>                  </span><span class="annot"><span class="annottext">OS
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-320"></span><span class="hs-comment">{-
  SunOS/Solaris ld emits harmless warning messages about unresolved
  symbols in case of compiling into shared library when we do not
  link against all the required libs. That is the case of GHC which
  does not link against RTS library explicitly in order to be able to
  choose the library later based on binary application linking
  parameters. The warnings look like:

Undefined                       first referenced
  symbol                             in file
stg_ap_n_fast                       ./T2386_Lib.o
stg_upd_frame_info                  ./T2386_Lib.o
templatezmhaskell_LanguageziHaskellziTHziLib_litE_closure ./T2386_Lib.o
templatezmhaskell_LanguageziHaskellziTHziLib_appE_closure ./T2386_Lib.o
templatezmhaskell_LanguageziHaskellziTHziLib_conE_closure ./T2386_Lib.o
templatezmhaskell_LanguageziHaskellziTHziSyntax_mkNameGzud_closure ./T2386_Lib.o
newCAF                              ./T2386_Lib.o
stg_bh_upd_frame_info               ./T2386_Lib.o
stg_ap_ppp_fast                     ./T2386_Lib.o
templatezmhaskell_LanguageziHaskellziTHziLib_stringL_closure ./T2386_Lib.o
stg_ap_p_fast                       ./T2386_Lib.o
stg_ap_pp_fast                      ./T2386_Lib.o
ld: warning: symbol referencing errors

  this is actually coming from T2386 testcase. The emitting of those
  warnings is also a reason why so many TH testcases fail on Solaris.

  Following filter code is SunOS/Solaris linker specific and should
  filter out only linker warnings. Please note that the logic is a
  little bit more complex due to the simple reason that we need to preserve
  any other linker emitted messages. If there are any. Simply speaking
  if we see &quot;Undefined&quot; and later &quot;ld: warning:...&quot; then we omit all
  text between (including) the marks. Otherwise we copy the whole output.
-}</span><span>
</span><span id="line-354"></span><span>    </span><span class="annot"><a href="#local-6989586621681012052"><span class="hs-identifier hs-type">sunos_ld_filter</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-355"></span><span>    </span><span id="local-6989586621681012052"><span class="annot"><span class="annottext">sunos_ld_filter :: FilePath -&gt; FilePath
</span><a href="#local-6989586621681012052"><span class="hs-identifier hs-var hs-var">sunos_ld_filter</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unlines"><span class="hs-identifier hs-var">unlines</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; FilePath)
-&gt; (FilePath -&gt; [FilePath]) -&gt; FilePath -&gt; FilePath
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012051"><span class="hs-identifier hs-var">sunos_ld_filter'</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath])
-&gt; (FilePath -&gt; [FilePath]) -&gt; FilePath -&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath]
</span><a href="../../base/src/Data.OldList.html#lines"><span class="hs-identifier hs-var">lines</span></a></span><span>
</span><span id="line-356"></span><span>    </span><span id="local-6989586621681012051"><span class="annot"><span class="annottext">sunos_ld_filter' :: [FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012051"><span class="hs-identifier hs-var hs-var">sunos_ld_filter'</span></a></span></span><span> </span><span id="local-6989586621681012050"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath] -&gt; Bool
</span><a href="#local-6989586621681012049"><span class="hs-identifier hs-var">undefined_found</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; Bool
</span><a href="#local-6989586621681012047"><span class="hs-identifier hs-var">ld_warning_found</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-357"></span><span>                          </span><span class="hs-keyword">then</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012046"><span class="hs-identifier hs-var">ld_prefix</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012045"><span class="hs-identifier hs-var">ld_postfix</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-358"></span><span>                          </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012050"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-359"></span><span>    </span><span id="local-6989586621681012042"><span class="annot"><span class="annottext">breakStartsWith :: [a] -&gt; [[a]] -&gt; ([[a]], [[a]])
</span><a href="#local-6989586621681012042"><span class="hs-identifier hs-var hs-var">breakStartsWith</span></a></span></span><span> </span><span id="local-6989586621681012041"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681012041"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span id="local-6989586621681012040"><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621681012040"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; Bool) -&gt; [[a]] -&gt; ([[a]], [[a]])
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="../../base/src/GHC.List.html#break"><span class="hs-identifier hs-var">break</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; Bool
forall a. Eq a =&gt; [a] -&gt; [a] -&gt; Bool
</span><a href="../../base/src/Data.OldList.html#isPrefixOf"><span class="hs-identifier hs-var">isPrefixOf</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621681012041"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[[a]]
</span><a href="#local-6989586621681012040"><span class="hs-identifier hs-var">y</span></a></span><span>
</span><span id="line-360"></span><span>    </span><span id="local-6989586621681012046"><span class="annot"><span class="annottext">ld_prefix :: [FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012046"><span class="hs-identifier hs-var hs-var">ld_prefix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath]) -&gt; [FilePath]
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath], [FilePath]) -&gt; [FilePath])
-&gt; ([FilePath] -&gt; ([FilePath], [FilePath]))
-&gt; [FilePath]
-&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; ([FilePath], [FilePath])
forall {a}. Eq a =&gt; [a] -&gt; [[a]] -&gt; ([[a]], [[a]])
</span><a href="#local-6989586621681012042"><span class="hs-identifier hs-var">breakStartsWith</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Undefined&quot;</span></span><span>
</span><span id="line-361"></span><span>    </span><span id="local-6989586621681012049"><span class="annot"><span class="annottext">undefined_found :: [FilePath] -&gt; Bool
</span><a href="#local-6989586621681012049"><span class="hs-identifier hs-var hs-var">undefined_found</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; ([FilePath] -&gt; Bool) -&gt; [FilePath] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; Bool)
-&gt; ([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath]) -&gt; [FilePath]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath], [FilePath]) -&gt; [FilePath])
-&gt; ([FilePath] -&gt; ([FilePath], [FilePath]))
-&gt; [FilePath]
-&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; ([FilePath], [FilePath])
forall {a}. Eq a =&gt; [a] -&gt; [[a]] -&gt; ([[a]], [[a]])
</span><a href="#local-6989586621681012042"><span class="hs-identifier hs-var">breakStartsWith</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Undefined&quot;</span></span><span>
</span><span id="line-362"></span><span>    </span><span id="local-6989586621681012034"><span class="annot"><span class="annottext">ld_warn_break :: [FilePath] -&gt; ([FilePath], [FilePath])
</span><a href="#local-6989586621681012034"><span class="hs-identifier hs-var hs-var">ld_warn_break</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; ([FilePath], [FilePath])
forall {a}. Eq a =&gt; [a] -&gt; [[a]] -&gt; ([[a]], [[a]])
</span><a href="#local-6989586621681012042"><span class="hs-identifier hs-var">breakStartsWith</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;ld: warning: symbol referencing errors&quot;</span></span><span>
</span><span id="line-363"></span><span>    </span><span id="local-6989586621681012045"><span class="annot"><span class="annottext">ld_postfix :: [FilePath] -&gt; [FilePath]
</span><a href="#local-6989586621681012045"><span class="hs-identifier hs-var hs-var">ld_postfix</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#tail"><span class="hs-identifier hs-var">tail</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; [FilePath])
-&gt; ([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath]) -&gt; [FilePath]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath], [FilePath]) -&gt; [FilePath])
-&gt; ([FilePath] -&gt; ([FilePath], [FilePath]))
-&gt; [FilePath]
-&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; ([FilePath], [FilePath])
</span><a href="#local-6989586621681012034"><span class="hs-identifier hs-var">ld_warn_break</span></a></span><span>
</span><span id="line-364"></span><span>    </span><span id="local-6989586621681012047"><span class="annot"><span class="annottext">ld_warning_found :: [FilePath] -&gt; Bool
</span><a href="#local-6989586621681012047"><span class="hs-identifier hs-var hs-var">ld_warning_found</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="annot"><span class="annottext">(Bool -&gt; Bool) -&gt; ([FilePath] -&gt; Bool) -&gt; [FilePath] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath] -&gt; Bool)
-&gt; ([FilePath] -&gt; [FilePath]) -&gt; [FilePath] -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">([FilePath], [FilePath]) -&gt; [FilePath]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath], [FilePath]) -&gt; [FilePath])
-&gt; ([FilePath] -&gt; ([FilePath], [FilePath]))
-&gt; [FilePath]
-&gt; [FilePath]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; ([FilePath], [FilePath])
</span><a href="#local-6989586621681012034"><span class="hs-identifier hs-var">ld_warn_break</span></a></span><span>
</span><span id="line-365"></span><span>
</span><span id="line-366"></span><span class="hs-comment">-- See Note [Merging object files for GHCi] in GHC.Driver.Pipeline.</span><span>
</span><span id="line-367"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runMergeObjects"><span class="hs-identifier hs-type">runMergeObjects</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-368"></span><span id="runMergeObjects"><span class="annot"><span class="annottext">runMergeObjects :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runMergeObjects"><span class="hs-identifier hs-var hs-var">runMergeObjects</span></a></span></span><span> </span><span id="local-6989586621681012030"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012030"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012029"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012029"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012030"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;merge-objects&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-369"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621681012028"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012028"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621681012027"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012027"><span class="hs-identifier hs-var">args0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; (FilePath, [Option])
</span><a href="GHC.Driver.Session.html#pgm_lm"><span class="hs-identifier hs-var">pgm_lm</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012030"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-370"></span><span>      </span><span id="local-6989586621681012025"><span class="annot"><span class="annottext">optl_args :: [Option]
</span><a href="#local-6989586621681012025"><span class="hs-identifier hs-var hs-var">optl_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012030"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_lm"><span class="hs-identifier hs-var">opt_lm</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-371"></span><span>      </span><span id="local-6989586621681012023"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012023"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012027"><span class="hs-identifier hs-var">args0</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012029"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012025"><span class="hs-identifier hs-var">optl_args</span></a></span><span>
</span><span id="line-372"></span><span>  </span><span class="hs-comment">-- N.B. Darwin's ld64 doesn't support response files. Consequently we only</span><span>
</span><span id="line-373"></span><span>  </span><span class="hs-comment">-- use them on Windows where they are truly necessary.</span><span class="hs-cpp">
#if defined(mingw32_HOST_OS)
</span><span>  </span><span id="local-6989586621681012022"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012022"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012023"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-376"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingResponseFile"><span class="hs-identifier hs-var">runSomethingResponseFile</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012030"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Merge objects&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012028"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012023"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012022"><span class="hs-identifier hs-var">mb_env</span></a></span><span class="hs-cpp">
#else
</span><span>  </span><span class="hs-identifier">runSomething</span><span> </span><span class="hs-identifier">dflags</span><span> </span><span class="hs-string">&quot;Merge objects&quot;</span><span> </span><span class="hs-identifier">p</span><span> </span><span class="hs-identifier">args2</span><span class="hs-cpp">
#endif
</span><span>
</span><span id="line-381"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runLibtool"><span class="hs-identifier hs-type">runLibtool</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-382"></span><span id="runLibtool"><span class="annot"><span class="annottext">runLibtool :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runLibtool"><span class="hs-identifier hs-var hs-var">runLibtool</span></a></span></span><span> </span><span id="local-6989586621681012020"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012019"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012019"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;libtool&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-383"></span><span>  </span><span id="local-6989586621681012018"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012018"><span class="hs-identifier hs-var">linkargs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LinkerInfo -&gt; [Option]
</span><a href="GHC.SysTools.Info.html#neededLinkArgs"><span class="hs-identifier hs-var">neededLinkArgs</span></a></span><span> </span><span class="annot"><span class="annottext">(LinkerInfo -&gt; [Option]) -&gt; IO LinkerInfo -&gt; IO [Option]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-operator hs-var">`fmap`</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; IO LinkerInfo
</span><a href="GHC.SysTools.Info.html#getLinkerInfo"><span class="hs-identifier hs-var">getLinkerInfo</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-384"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012017"><span class="annot"><span class="annottext">args1 :: [Option]
</span><a href="#local-6989586621681012017"><span class="hs-identifier hs-var hs-var">args1</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_l"><span class="hs-identifier hs-var">opt_l</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-385"></span><span>      </span><span id="local-6989586621681012016"><span class="annot"><span class="annottext">args2 :: [Option]
</span><a href="#local-6989586621681012016"><span class="hs-identifier hs-var hs-var">args2</span></a></span></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-static&quot;</span></span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012017"><span class="hs-identifier hs-var">args1</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012019"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; [Option] -&gt; [Option]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012018"><span class="hs-identifier hs-var">linkargs</span></a></span><span>
</span><span id="line-386"></span><span>      </span><span id="local-6989586621681012015"><span class="annot"><span class="annottext">libtool :: FilePath
</span><a href="#local-6989586621681012015"><span class="hs-identifier hs-var hs-var">libtool</span></a></span></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_libtool"><span class="hs-identifier hs-var">pgm_libtool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-387"></span><span>  </span><span id="local-6989586621681012013"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012013"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012016"><span class="hs-identifier hs-var">args2</span></a></span><span>
</span><span id="line-388"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012020"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Libtool&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012015"><span class="hs-identifier hs-var">libtool</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012016"><span class="hs-identifier hs-var">args2</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681012013"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-389"></span><span>
</span><span id="line-390"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runAr"><span class="hs-identifier hs-type">runAr</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-391"></span><span id="runAr"><span class="annot"><span class="annottext">runAr :: DynFlags -&gt; Maybe FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runAr"><span class="hs-identifier hs-var hs-var">runAr</span></a></span></span><span> </span><span id="local-6989586621681012011"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012011"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012010"><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621681012010"><span class="hs-identifier hs-var">cwd</span></a></span></span><span> </span><span id="local-6989586621681012009"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012009"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012011"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;ar&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-392"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012008"><span class="annot"><span class="annottext">ar :: FilePath
</span><a href="#local-6989586621681012008"><span class="hs-identifier hs-var hs-var">ar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_ar"><span class="hs-identifier hs-var">pgm_ar</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012011"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-393"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012011"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Ar&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012008"><span class="hs-identifier hs-var">ar</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012009"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621681012010"><span class="hs-identifier hs-var">cwd</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-394"></span><span>
</span><span id="line-395"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#askOtool"><span class="hs-identifier hs-type">askOtool</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.IO.html#FilePath"><span class="hs-identifier hs-type">FilePath</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-396"></span><span id="askOtool"><span class="annot"><span class="annottext">askOtool :: DynFlags -&gt; Maybe FilePath -&gt; [Option] -&gt; IO FilePath
</span><a href="GHC.SysTools.Tasks.html#askOtool"><span class="hs-identifier hs-var hs-var">askOtool</span></a></span></span><span> </span><span id="local-6989586621681012006"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012006"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681012005"><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621681012005"><span class="hs-identifier hs-var">mb_cwd</span></a></span></span><span> </span><span id="local-6989586621681012004"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012004"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-397"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681012003"><span class="annot"><span class="annottext">otool :: FilePath
</span><a href="#local-6989586621681012003"><span class="hs-identifier hs-var hs-var">otool</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_otool"><span class="hs-identifier hs-var">pgm_otool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012006"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-398"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; ([FilePath] -&gt; IO (ExitCode, FilePath))
-&gt; IO FilePath
forall a.
DynFlags
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; ([FilePath] -&gt; IO (ExitCode, a))
-&gt; IO a
</span><a href="GHC.SysTools.Process.html#runSomethingWith"><span class="hs-identifier hs-var">runSomethingWith</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681012006"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;otool&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012003"><span class="hs-identifier hs-var">otool</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681012004"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">(([FilePath] -&gt; IO (ExitCode, FilePath)) -&gt; IO FilePath)
-&gt; ([FilePath] -&gt; IO (ExitCode, FilePath)) -&gt; IO FilePath
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621681012001"><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012001"><span class="hs-identifier hs-var">real_args</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-399"></span><span>    </span><span class="annot"><span class="annottext">CreateProcess -&gt; IO (ExitCode, FilePath)
</span><a href="GHC.SysTools.Process.html#readCreateProcessWithExitCode%27"><span class="hs-identifier hs-var">readCreateProcessWithExitCode'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; CreateProcess
</span><a href="../../process/src/System.Process.html#proc"><span class="hs-identifier hs-var">proc</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681012003"><span class="hs-identifier hs-var">otool</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath]
</span><a href="#local-6989586621681012001"><span class="hs-identifier hs-var">real_args</span></a></span><span class="hs-special">)</span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">cwd :: Maybe FilePath
</span><a href="../../process/src/System.Process.Common.html#cwd"><span class="hs-identifier hs-var">cwd</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
</span><a href="#local-6989586621681012005"><span class="hs-identifier hs-var">mb_cwd</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-400"></span><span>
</span><span id="line-401"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runInstallNameTool"><span class="hs-identifier hs-type">runInstallNameTool</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-402"></span><span id="runInstallNameTool"><span class="annot"><span class="annottext">runInstallNameTool :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runInstallNameTool"><span class="hs-identifier hs-var hs-var">runInstallNameTool</span></a></span></span><span> </span><span id="local-6989586621681011999"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011999"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681011998"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011998"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-403"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681011997"><span class="annot"><span class="annottext">tool :: FilePath
</span><a href="#local-6989586621681011997"><span class="hs-identifier hs-var hs-var">tool</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_install_name_tool"><span class="hs-identifier hs-var">pgm_install_name_tool</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011999"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-404"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011999"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Install Name Tool&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011997"><span class="hs-identifier hs-var">tool</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011998"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-405"></span><span>
</span><span id="line-406"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runRanlib"><span class="hs-identifier hs-type">runRanlib</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-407"></span><span id="runRanlib"><span class="annot"><span class="annottext">runRanlib :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runRanlib"><span class="hs-identifier hs-var hs-var">runRanlib</span></a></span></span><span> </span><span id="local-6989586621681011994"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011994"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681011993"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011993"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011994"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;ranlib&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-408"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681011992"><span class="annot"><span class="annottext">ranlib :: FilePath
</span><a href="#local-6989586621681011992"><span class="hs-identifier hs-var hs-var">ranlib</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_ranlib"><span class="hs-identifier hs-var">pgm_ranlib</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011994"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-409"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011994"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Ranlib&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011992"><span class="hs-identifier hs-var">ranlib</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011993"><span class="hs-identifier hs-var">args</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#runWindres"><span class="hs-identifier hs-type">runWindres</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-type">Option</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-412"></span><span id="runWindres"><span class="annot"><span class="annottext">runWindres :: DynFlags -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#runWindres"><span class="hs-identifier hs-var hs-var">runWindres</span></a></span></span><span> </span><span id="local-6989586621681011989"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681011988"><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011988"><span class="hs-identifier hs-var">args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;windres&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-413"></span><span>  </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621681011987"><span class="annot"><span class="annottext">cc :: FilePath
</span><a href="#local-6989586621681011987"><span class="hs-identifier hs-var hs-var">cc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_c"><span class="hs-identifier hs-var">pgm_c</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-414"></span><span>      </span><span id="local-6989586621681011986"><span class="annot"><span class="annottext">cc_args :: [Option]
</span><a href="#local-6989586621681011986"><span class="hs-identifier hs-var hs-var">cc_args</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Settings -&gt; [FilePath]
</span><a href="GHC.Settings.html#sOpt_c"><span class="hs-identifier hs-var">sOpt_c</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; Settings
</span><a href="GHC.Driver.Session.html#settings"><span class="hs-identifier hs-var">settings</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-415"></span><span>      </span><span id="local-6989586621681011983"><span class="annot"><span class="annottext">windres :: FilePath
</span><a href="#local-6989586621681011983"><span class="hs-identifier hs-var hs-var">windres</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_windres"><span class="hs-identifier hs-var">pgm_windres</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span>
</span><span id="line-416"></span><span>      </span><span id="local-6989586621681011981"><span class="annot"><span class="annottext">opts :: [Option]
</span><a href="#local-6989586621681011981"><span class="hs-identifier hs-var hs-var">opts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; Option) -&gt; [FilePath] -&gt; [Option]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; (DynFlags -&gt; [FilePath]) -&gt; [FilePath]
forall a. DynFlags -&gt; (DynFlags -&gt; [a]) -&gt; [a]
</span><a href="GHC.Driver.Session.html#getOpts"><span class="hs-identifier hs-var">getOpts</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; [FilePath]
</span><a href="GHC.Driver.Session.html#opt_windres"><span class="hs-identifier hs-var">opt_windres</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-417"></span><span>      </span><span id="local-6989586621681011979"><span class="annot"><span class="annottext">quote :: FilePath -&gt; FilePath
</span><a href="#local-6989586621681011979"><span class="hs-identifier hs-var hs-var">quote</span></a></span></span><span> </span><span id="local-6989586621681011978"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011978"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;\&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011978"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;\&quot;&quot;</span></span><span>
</span><span id="line-418"></span><span>      </span><span id="local-6989586621681011977"><span class="annot"><span class="annottext">args' :: [Option]
</span><a href="#local-6989586621681011977"><span class="hs-identifier hs-var hs-var">args'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-comment">-- If windres.exe and gcc.exe are in a directory containing</span><span>
</span><span id="line-419"></span><span>              </span><span class="hs-comment">-- spaces then windres fails to run gcc. We therefore need</span><span>
</span><span id="line-420"></span><span>              </span><span class="hs-comment">-- to tell it what command to use...</span><span>
</span><span id="line-421"></span><span>              </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;--preprocessor=&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-422"></span><span>                      </span><span class="annot"><span class="annottext">[FilePath] -&gt; FilePath
</span><a href="../../base/src/Data.OldList.html#unwords"><span class="hs-identifier hs-var">unwords</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(FilePath -&gt; FilePath) -&gt; [FilePath] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
</span><a href="#local-6989586621681011979"><span class="hs-identifier hs-var">quote</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011987"><span class="hs-identifier hs-var">cc</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; [FilePath] -&gt; [FilePath]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span>
</span><span id="line-423"></span><span>                                          </span><span class="annot"><span class="annottext">(Option -&gt; FilePath) -&gt; [Option] -&gt; [FilePath]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Option -&gt; FilePath
</span><a href="GHC.Utils.CliOption.html#showOpt"><span class="hs-identifier hs-var">showOpt</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011981"><span class="hs-identifier hs-var">opts</span></a></span><span> </span><span class="annot"><span class="annottext">[FilePath] -&gt; [FilePath] -&gt; [FilePath]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-424"></span><span>                                          </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-E&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-xc&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;-DRC_INVOKED&quot;</span></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-425"></span><span>              </span><span class="hs-comment">-- ...but if we do that then if windres calls popen then</span><span>
</span><span id="line-426"></span><span>              </span><span class="hs-comment">-- it can't understand the quoting, so we have to use</span><span>
</span><span id="line-427"></span><span>              </span><span class="hs-comment">-- --use-temp-file so that it interprets it correctly.</span><span>
</span><span id="line-428"></span><span>              </span><span class="hs-comment">-- See #1828.</span><span>
</span><span id="line-429"></span><span>            </span><span class="annot"><span class="annottext">Option -&gt; [Option] -&gt; [Option]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#Option"><span class="hs-identifier hs-var">Option</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;--use-temp-file&quot;</span></span><span>
</span><span id="line-430"></span><span>            </span><span class="annot"><span class="annottext">Option -&gt; [Option] -&gt; [Option]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011988"><span class="hs-identifier hs-var">args</span></a></span><span>
</span><span id="line-431"></span><span>  </span><span id="local-6989586621681011975"><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681011975"><span class="hs-identifier hs-var">mb_env</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Option] -&gt; IO (Maybe [(FilePath, FilePath)])
</span><a href="GHC.SysTools.Process.html#getGccEnv"><span class="hs-identifier hs-var">getGccEnv</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011986"><span class="hs-identifier hs-var">cc_args</span></a></span><span>
</span><span id="line-432"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
-&gt; (FilePath -&gt; FilePath)
-&gt; FilePath
-&gt; FilePath
-&gt; [Option]
-&gt; Maybe FilePath
-&gt; Maybe [(FilePath, FilePath)]
-&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomethingFiltered"><span class="hs-identifier hs-var">runSomethingFiltered</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011989"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;Windres&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011983"><span class="hs-identifier hs-var">windres</span></a></span><span> </span><span class="annot"><span class="annottext">[Option]
</span><a href="#local-6989586621681011977"><span class="hs-identifier hs-var">args'</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe FilePath
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe [(FilePath, FilePath)]
</span><a href="#local-6989586621681011975"><span class="hs-identifier hs-var">mb_env</span></a></span><span>
</span><span id="line-433"></span><span>
</span><span id="line-434"></span><span class="annot"><a href="GHC.SysTools.Tasks.html#touch"><span class="hs-identifier hs-type">touch</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-435"></span><span id="touch"><span class="annot"><span class="annottext">touch :: DynFlags -&gt; FilePath -&gt; FilePath -&gt; IO ()
</span><a href="GHC.SysTools.Tasks.html#touch"><span class="hs-identifier hs-var hs-var">touch</span></a></span></span><span> </span><span id="local-6989586621681011973"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011973"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681011972"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011972"><span class="hs-identifier hs-var">purpose</span></a></span></span><span> </span><span id="local-6989586621681011971"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011971"><span class="hs-identifier hs-var">arg</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; IO () -&gt; IO ()
forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var">traceToolCommand</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011973"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;touch&quot;</span></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; IO ()) -&gt; IO () -&gt; IO ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-436"></span><span>  </span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath -&gt; FilePath -&gt; [Option] -&gt; IO ()
</span><a href="GHC.SysTools.Process.html#runSomething"><span class="hs-identifier hs-var">runSomething</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011973"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011972"><span class="hs-identifier hs-var">purpose</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">DynFlags -&gt; FilePath
</span><a href="GHC.Driver.Session.html#pgm_T"><span class="hs-identifier hs-var">pgm_T</span></a></span><span> </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011973"><span class="hs-identifier hs-var">dflags</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; Option
</span><a href="GHC.Utils.CliOption.html#FileOption"><span class="hs-identifier hs-var">FileOption</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011971"><span class="hs-identifier hs-var">arg</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-437"></span><span>
</span><span id="line-438"></span><span class="hs-comment">-- * Tracing utility</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span class="hs-comment">-- | Record in the eventlog when the given tool command starts</span><span>
</span><span id="line-441"></span><span class="hs-comment">--   and finishes, prepending the given 'String' with</span><span>
</span><span id="line-442"></span><span class="hs-comment">--   \&quot;systool:\&quot;, to easily be able to collect and process</span><span>
</span><span id="line-443"></span><span class="hs-comment">--   all the systool events.</span><span>
</span><span id="line-444"></span><span class="hs-comment">--</span><span>
</span><span id="line-445"></span><span class="hs-comment">--   For those events to show up in the eventlog, you need</span><span>
</span><span id="line-446"></span><span class="hs-comment">--   to run GHC with @-v2@ or @-ddump-timings@.</span><span>
</span><span id="line-447"></span><span id="local-6989586621681012469"><span class="annot"><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-type">traceToolCommand</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Driver.Session.html#DynFlags"><span class="hs-identifier hs-type">DynFlags</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621681012469"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="hs-identifier hs-type">IO</span></span><span> </span><span class="annot"><a href="#local-6989586621681012469"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-448"></span><span id="traceToolCommand"><span class="annot"><span class="annottext">traceToolCommand :: forall a. DynFlags -&gt; FilePath -&gt; IO a -&gt; IO a
</span><a href="GHC.SysTools.Tasks.html#traceToolCommand"><span class="hs-identifier hs-var hs-var">traceToolCommand</span></a></span></span><span> </span><span id="local-6989586621681011966"><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011966"><span class="hs-identifier hs-var">dflags</span></a></span></span><span> </span><span id="local-6989586621681011965"><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011965"><span class="hs-identifier hs-var">tool</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DynFlags -&gt; MsgDoc -&gt; (a -&gt; ()) -&gt; IO a -&gt; IO a
forall (m :: * -&gt; *) a.
MonadIO m =&gt;
DynFlags -&gt; MsgDoc -&gt; (a -&gt; ()) -&gt; m a -&gt; m a
</span><a href="GHC.Utils.Error.html#withTiming"><span class="hs-identifier hs-var">withTiming</span></a></span><span>
</span><span id="line-449"></span><span>  </span><span class="annot"><span class="annottext">DynFlags
</span><a href="#local-6989586621681011966"><span class="hs-identifier hs-var">dflags</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">FilePath -&gt; MsgDoc
</span><a href="GHC.Utils.Outputable.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">(FilePath -&gt; MsgDoc) -&gt; FilePath -&gt; MsgDoc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><span class="hs-string">&quot;systool:&quot;</span></span><span> </span><span class="annot"><span class="annottext">FilePath -&gt; FilePath -&gt; FilePath
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FilePath
</span><a href="#local-6989586621681011965"><span class="hs-identifier hs-var">tool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; a -&gt; ()
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-450"></span></pre></body></html>